<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
</html>
<?php
	session_start();
	if (!isset($_SESSION['username'])) {
		echo "<script language='javascript'>";
		echo "alert('You have no permission to read this page!');";
		echo "history.back();";
		echo "</script>";
		header("location:../login.php");
	}else {
		$uid = $_SESSION['uid'];
		require('../../Controller/makefriend_controller.php');
		$grpid = $_POST['grpid'];
		$groupName = $_POST['groupName'];
		if($groupName==""){
			header("location:../index.php?id=$senttoid");
		}else{
			$control = new MakeFriend_Controller();
			$control->edit_grp($uid, $grpid, $groupName);	
		}
		
	}
?>